<?php

declare(strict_types=1);

namespace App\Api\Request;

use Mine\MineFormRequest;

class MemberRequest extends MineFormRequest
{
    public function updateRules(): array
    {
        return [
            'avatar' => 'required|string|max:255|url',
            'nickname' => 'required|string|max:50',
            'phone' => 'required|string|size:11|regex:/^1\d{10}$/',
        ];
    }

    public function attributes(): array
    {
        return [
            'avatar' => '用户头像',
            'nickname' => '昵称',
            'phone' => '手机号',
        ];
    }
}
